import service from './service';

/**
 * 微信申请退款
 * @param trade_no 订单单号
 * @param fee 退款金额
 * @param out_refund_no 退款单号
 * @example refunds(url, trade_no, fee, out_refund_no);
 */
export default function refunds(trade_no: string, fee: string, out_refund_no: string) {
	const param = {
		fee,
		flag: '108',
		out_refund_no,
		thirdpay_type: 'weixin_refunds',
		trade_no
	};
	return service('payservice.thirdpayment', param);
}
